﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using QL_KhachSan.App_Code.BUS;
using QL_KhachSan.App_Code.OBJ;
using System.Data.SqlClient;
using System.Data;

namespace QL_KhachSan.App_Code.DAL
{
    class DAL_Phong
    {
        db_Connection dbcon;
        public DAL_Phong() {
            dbcon = new db_Connection();
        }
        public DataTable select_nopara(string query) {
            DataTable dt = new DataTable();
            dt = dbcon.proc_select_nopara(query);
            return dt;
        }
        public DataTable select_para(string query, SqlParameter[] p)
        {
            DataTable dt = new DataTable();
            dt = dbcon.proc_select_para(query, p);
            return dt;
        }
        public void add_phong(SqlParameter[] p)
        {
            dbcon.exe_proc_para("add_phong", p);
        }
        public void delete_phong(SqlParameter[] p)
        {
            dbcon.exe_proc_para("delete_phong", p);
        }
        public void edit_phong(SqlParameter[] p)
        {
            dbcon.exe_proc_para("edit_phong", p);
        }
    }
}
